
***** Table 8 ******

use "/Users/scottfabramson/Dropbox/io_endogenous_replication/main_text_do/tables/table_8/table_8.dta",clear


tsset ID Year


replace med = med/100
replace atlantic_dist = atlantic_dist/100



gen y1_Atd = y1 * atlantic_dist
gen y2_Atd = y2 * atlantic_dist
gen y3_Atd = y3 * atlantic_dist
gen y4_Atd = y4 * atlantic_dist
gen y5_Atd = y5 * atlantic_dist
gen y6_Atd = y6 * atlantic_dist
gen y7_Atd = y7 * atlantic_dist



***** Panel 1 ******



xtreg Urban_Pop y2 y3 y4 y5 y6 y7 c.y2#c.Atlantic  c.y3#c.Atlantic c.y4#c.Atlantic c.y5#c.Atlantic c.y6#c.Atlantic c.y7#c.Atlantic c.y2#c.Med c.y3#c.Med c.y4#c.Med c.y5#c.Med c.y6#c.Med c.y7#c.Med, fe cluster(ID)

test c.y2#c.Med==c.y2#c.Atlantic
test c.y3#c.Med==c.y3#c.Atlantic
test c.y4#c.Med==c.y4#c.Atlantic
test c.y5#c.Med==c.y5#c.Atlantic
test c.y6#c.Med==c.y6#c.Atlantic
test c.y7#c.Med==c.y7#c.Atlantic




***** Panel 2 ******


xtreg Urban_Pop y2 y3 y4 y5 y6 y7 c.y2#c.atlantic_dist  c.y3#c.atlantic_dist c.y4#c.atlantic_dist c.y5#c.atlantic_dist c.y6#c.atlantic_dist c.y7#c.atlantic_dist c.y2#c.med c.y3#c.med c.y4#c.med c.y5#c.med c.y6#c.med c.y7#c.med, fe cluster(ID)

test c.y2#c.med==c.y2#c.atlantic_dist
test c.y3#c.med==c.y3#c.atlantic_dist
test c.y4#c.med==c.y4#c.atlantic_dist
test c.y5#c.med==c.y5#c.atlantic_dist
test c.y6#c.med==c.y6#c.atlantic_dist
test c.y7#c.med==c.y7#c.atlantic_dist


****** Panel 3 ******


xtdpdsys Urban_Pop y3 y4 y5 y6 y3_At y4_At y5_At y6_At y7_At, lag(1) twostep vce(robust)


estat abond



******* Panel 4 ******


xtdpdsys Urban_Pop y3 y4 y5 y6 y3_Atd y4_Atd y5_Atd y6_Atd y7_Atd, lag(1) twostep vce(robust)



estat abond




xtdpdsys Urban_Pop y3 y4 y5 y6 y3_Atd y4_Atd y5_Atd y6_Atd y7_Atd, lag(1) twostep vce(robust)


